using System;
using System.Threading.Tasks;
using hao_Model;
using hao_Common.Dapper.Repository;

namespace hao_Reppsitory
{
    /// <summary>
    /// 商品留言点赞仓储接口
    /// </summary>
    public interface IProductCommentLikeRepository : IGenericRepository<ProductCommentLike>
    {
        /// <summary>
        /// 检查用户是否已点赞留言
        /// </summary>
        /// <param name="commentId">留言ID</param>
        /// <param name="userId">用户ID</param>
        /// <returns>点赞记录</returns>
        Task<ProductCommentLike> GetLikeAsync(Guid commentId, Guid userId);

        /// <summary>
        /// 添加点赞
        /// </summary>
        /// <param name="commentId">留言ID</param>
        /// <param name="userId">用户ID</param>
        /// <returns>点赞记录</returns>
        Task<ProductCommentLike> AddLikeAsync(Guid commentId, Guid userId);

        /// <summary>
        /// 取消点赞
        /// </summary>
        /// <param name="commentId">留言ID</param>
        /// <param name="userId">用户ID</param>
        /// <returns>操作结果</returns>
        Task<bool> RemoveLikeAsync(Guid commentId, Guid userId);

        /// <summary>
        /// 获取留言的点赞数量
        /// </summary>
        /// <param name="commentId">留言ID</param>
        /// <returns>点赞数量</returns>
        Task<int> GetLikeCountAsync(Guid commentId);
    }
}